/*
 *  WaveTable.h
 *  SoundController0002
 *
 *  Created by jiro on 10/06/28.
 *  Copyright 2010 jiro music. All rights reserved.
 *
 */

#pragma once

#include <vector>
#include <string>
#include <sstream>
#include "NullableObject.h"

namespace sc 
{
	class WaveTable : public NullableObject
	{
	public:

		enum Type
		{
			Type_Sine,

			Type_Constant,

			Type_Array,

			Type_Function,

			Type_Null,
		};

	protected:

		Type type;

		double frequency;

		double adjuster;

	public:

		WaveTable( Type type, double frequency, double adjuster );

		virtual ~WaveTable();

		virtual bool operator == ( const WaveTable& rhs ) const;

		virtual bool operator != ( const WaveTable& rhs ) const;

		//	for std::set
		virtual bool operator < ( const WaveTable& rhs ) const;

		Type GetType() const;

		double GetAdjuster() const;

		bool IsNull() const;

		virtual double operator [] ( double time ) const = 0;
		
		virtual double GetFrequency() const;

		virtual std::string ToString() const;
	};
	
}
